﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyList
{
    class Program
    {
        static void Main(string[] args)
        {
            var list = new MyList<int>();
            Random random = new Random();
            for(int i = 0; i < list.Length; i++)
            {
                list[i] = random.Next(114514);
            }
            list.ForEach(i => Console.Write(i + " "));
            Console.Write('\n');
            Console.WriteLine(list.ForEach((a, b) => a > b ? a : b));
            Console.WriteLine(list.ForEach((a, b) => a < b ? a : b));
            Console.WriteLine(list.ForEach((a, b) => a + b));
            Console.ReadKey();
        }
    }
}
